package com.lqd.demo.springboot;

import java.util.Date;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lqd.demo.springboot.bean.User;

//直接将对象做json字符串返回
@RestController
public class WebJson {

	@RequestMapping("getUser")
	private User getUser() {

		User user = new User();
		user.setCreateTime(new Date());
		user.setUserId("CNWJ1001");
		user.setUserName("张三");
		
		return user;
	}
}
